package com.jy.wms.dao;

import com.jy.wms.common.base.BaseDao;
import com.jy.wms.pojo.OutstockDetailedReport;
import com.jy.wms.pojo.WmsOrderChannel;
import com.jy.wms.pojo.WmsOwnerOrdertype;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by syh on 2018/4/11.
 */
public interface WmsOutstockDetailedReportMapper extends BaseDao<OutstockDetailedReport> {
    /**
     * 分页查询
     * @param entity 实体
     * @return
     */
    public List<OutstockDetailedReport> baseSelectPage(@Param("OutstockDetailedReport") OutstockDetailedReport entity, @Param("list") List<String> ddqdidList1);

    /**
     * 查询全部的订单渠道集合
     * @return
     */
    public List<WmsOrderChannel> getOrderChannel();
    /**
     * 查出库类型
     * @param hzid
     * @param ckid
     * @return
     */
    public List<WmsOwnerOrdertype> selectType(@Param("hzid") String hzid, @Param("ckid") String ckid);

    /**
     * 查期初库存getQckc是上架数量,getQckc1是拣货数量
     * @param outstockDetailedReport
     * @return
     */
    public Integer getQckc(@Param("OutstockDetailedReport") OutstockDetailedReport outstockDetailedReport, @Param("cjsj_start") String cjsj_start);
    public Integer getQckc1(@Param("OutstockDetailedReport") OutstockDetailedReport outstockDetailedReport);

    /**
     * 查期末库存getQmkc是上架数量,getQmkc1是拣货数量
     * @param outstockDetailedReport
     * @return
     */
    public Integer getQmkc(@Param("OutstockDetailedReport") OutstockDetailedReport outstockDetailedReport, @Param("cjsj_end") String cjsj_end);
    public Integer getQmkc1(@Param("OutstockDetailedReport") OutstockDetailedReport outstockDetailedReport);

    /**
     * 查出库汇总
     * @param outstockDetailedReport
     * @return
     */
    public String getCkhz(@Param("OutstockDetailedReport") OutstockDetailedReport outstockDetailedReport, @Param("cjsj_start") String cjsj_start, @Param("cjsj_end") String cjsj_end,
                          @Param("hzid") String hzid, @Param("ckid") String ckid);

    /**
     * 用货品编号 查订单类型
     * @param cpbh
     * @param hzid
     * @param ckid
     * @return
     */
    public List<Map<String, Object>> selectDdlx(@Param("cpbh") String cpbh, @Param("hzid") String hzid, @Param("ckid") String ckid, @Param("cjsj_start") String cjsj_start, @Param("cjsj_end") String cjsj_end);

    /**
     * 订单渠道名称模糊查询
     * @param
     * @return
     */
    public List<WmsOrderChannel> getDdmc(@Param("mc") String mc, @Param("hzid") String hzid, @Param("ckid") String ckid);

    /**
     * 查询所有订单渠道id
     * @return
     */
    List<WmsOrderChannel> getDqid(@Param("ckid") String ckid, @Param("hzid") String hzid, @Param("pid") String pid);
}
